package com.crm.service;

import java.util.List;
import java.util.Map;

import com.crm.handler.ConsultInfoImprotException;
import com.crm.model.ConsultInfoManage;
import com.crm.model.ConsultInfoManageIllegal;
import com.crm.model.ConsultInfoManagePay;
import com.crm.model.entity.CountWorkBench;
import com.crm.model.entity.KeyValue;
import com.github.pagehelper.Page;

public interface ConsultInfoManageService extends BaseService<ConsultInfoManage>{
	List<KeyValue> loadSum(ConsultInfoManage record);

	List<ConsultInfoManage> selectFinanceGroupBalance(
			Page<ConsultInfoManage> page, ConsultInfoManage manage);

	ConsultInfoManage getTotalIncome(ConsultInfoManage infomanage);
	
	public List<CountWorkBench> task(CountWorkBench record);
	
	public CountWorkBench localCount(CountWorkBench record);
	
	public CountWorkBench localGroup(CountWorkBench record);
	
	public CountWorkBench localSum(CountWorkBench record);
	
	public CountWorkBench loadMustPaySum(ConsultInfoManage record);
	
	public CountWorkBench localSumSort(CountWorkBench record);

	List<ConsultInfoManage> selectFinanceSchoolBalance(
			Page<ConsultInfoManage> page, ConsultInfoManage manage);
	
	ConsultInfoManage getTopOne(ConsultInfoManage record);

	List<ConsultInfoManage> selectFinanceGroupReceivableBalance(
			Page<ConsultInfoManage> page, ConsultInfoManage manage);

	ConsultInfoManage getReceivableTotalIncome(ConsultInfoManage t);

	List<ConsultInfoManagePay> getPayByInfoId(String infoManageId);

	ConsultInfoManage getSchoolTotalNum(ConsultInfoManage t);

	ConsultInfoManage loadPersonal(ConsultInfoManage t);

	List<ConsultInfoManage> selectView(Page<ConsultInfoManage> page, ConsultInfoManage t);

	public ConsultInfoManage selectByPrimaryKey2(String infoManageId);
	
	ConsultInfoManage getDepartment2Id(ConsultInfoManage t); 
	
	ConsultInfoManage getDepartmentId2FromRed(ConsultInfoManage t);

	List<ConsultInfoManage> selectAllM(Page<ConsultInfoManage> page,Map<String, Object> map);
	
	/**
	 * 查询所有需要再分配的信息量（信息回流）
	 * 
	 * @return
	 */
	List<ConsultInfoManage> selectRedistributionInfo();

	List<ConsultInfoManage> selectAllD(Page<ConsultInfoManage> page,Map<String, Object> map);
}
